Crate foundry_config
source ·Expand description
Foundry configuration.
Re-exports
pub use fmt::FormatterConfig;
pub use crate::fs_permissions::FsPermissions;
pub use error::SolidityErrorCode;
pub use doc::DocConfig;
pub use ethers_solc;
pub use figment;
pub use crate::utils::*;
Modules
- Support types for configuring storage caching
- Configuration specific to the
forge doc
command and theforge_doc
package - error handling and solc error codes
- Helpers to automatically fix configuration warnings
- Configuration specific to the
forge fmt
command and theforge_fmt
package - Support for controlling fs access
- config providers
- Utility functions
Macros
- A macro to implement converters from a type to [
Config
] andfigment::Figment
- Same as
impl_figment_convert
but also impliesProvider
for the givenSerialize
type for convenience. TheProvider
only provides the “root” value for the current profile - A macro to implement converters from a type to [
Config
] andfigment::Figment
- Same as
impl_figment_convert
but also merges the type itself into the figment
Structs
- A subset of the foundry
Config
used to initialize afoundry.toml
file - Foundry configuration
- Contains for fuzz testing
- Contains for fuzz testing
- Wrapper for the config’s
gas_limit
value necessary because toml-rs can’t handle larger number because integers are stored signed: https://github.com/alexcrichton/toml-rs/issues/256 - Represents per-test configurations, declared inline as structured comments in Solidity test files. This allows to create configs directly bound to a solidity test.
- Wrapper error struct that catches config parsing errors [
InlineConfigParserError
], enriching them with context information reporting the misconfigured line. - Contains for invariant testing
- Convenient struct to hold in-line per-test configurations
- Wrapper type for
regex::Regex
that implementsPartialEq
- Container type for resolved endpoints, see [RpcEndpoints::resolve_all()]
- A helper wrapper around the root path used during Config detection
- Container type for API endpoints, like various RPC endpoints
- Error when we failed to resolve an env var
Enums
- Either a named or chain id or the actual id value
- Represents a single endpoint
- Variants for selecting the
Solc
instance - Warnings emitted during loading or managing Configuration
Statics
- Deprecated keys.
- Mapping of fallback standalone sections. See
FallbackProfileProvider
Traits
- This trait is intended to parse configurations from structured text. Foundry users can annotate Solidity test functions, providing special configs just for the execution of a specific test.
Functions
- Parses a config profile
- Checks if all configuration lines specified in
natspec
use a valid profile.